<?php
//define('NO_CHECK_LOGIN','ture');
require 'init.php';
if(isset($_SESSION['cms']['admin'])){
		$user=$_SESSION['cms']['admin'];
	}
if ( @$user[ 'username' ] != '' ) {
    $userid=$user['userid'];
    $login="退出登录";
	$herf="../model/userdata.php?";
	if(file_exists("../../upload/userphoto/userphoto_$userid.jpg")){
          $photo = "../../upload/userphoto/userphoto_$userid.jpg";  
        }else{
          $photo = "../../upload/userphoto/userphoto_0.jpg";
        }
    }else{
    $login="去登录";
	$herf="../view/login.html";                
	$photo = "../../upload/userphoto/userphoto_0.jpg";
    }
$web1data=mysqli_query($link,"SELECT * FROM `webtable` WHERE `websrc`='web1' ORDER BY `webid` DESC");
$web2data=mysqli_query($link,"SELECT * FROM `webtable` WHERE `websrc`='web2' ORDER BY `webid` DESC");
$web1data=mysqli_fetch_all($web1data,MYSQLI_ASSOC);
$web2data=mysqli_fetch_all($web2data,MYSQLI_ASSOC);
require '../view/web.html';
?>